package com.joinway.framework.bean.domain.constant;

import java.util.Arrays;
import java.util.List;

public final class SqlConstants {

	public static class Key{
		public static final String Id = "id";
		public static final String Page = "page";
		public static final String Rows = "rows";
		public static final String All = "*";
	}
	
	public static class DataType {
		public static final String Date = "date";
		public static final String DateTime = "datetime";
		public static final String Text = "text";
		public static final String Number = "number";
	}

	public static class Operator {
		public static final String Like = "like";
		public static final String Between = "between";
		public static final String In = "in";
		public static final String Equals = "=";
		public static final String GreaterOrEquals = ">=";
		public static final String LessOrEquals = "<=";
	}

	public static class Condition {
		public static final String And = "and";
		public static final String Or = "or";
	}
	
	public static class Order{
		public static final String Asc = "asc";
		public static final String Desc = "desc";
	}

	public static class PersistenceAction {
		public static final String Update = "update";
		public static final String Insert = "insert";
		public static final String UpdateOrInsert = "updateOrInsert";
	}
	
	public static class DataBase {
		public static final String MySql = "mysql";
		public static final String Hsqldb = "hsqldb";
	}
	
	public static class ReservedValue{
		public static final String CURRENT_TIMESTAMP = "current_timestamp";
		public static final String CURRENT_TIME = "current_time";
		public static final String NOW = "now()";
	}
	
	public final static List<String> RESERVED_VALUES = Arrays.asList(new String[]{ReservedValue.CURRENT_TIME, ReservedValue.CURRENT_TIMESTAMP, ReservedValue.NOW});
	
	private SqlConstants(){}
}
